package com.haofengsoft.scce.adapter.index;

import com.haofengsoft.scce.R;

/**
 * Created by admin on 2015/7/24.
 */
public class TopNewModel {

    private int id;
    private String content;
    private String summary;
    private String dateTime;
    private String source;
    private ModelTypeRes modelTypeRes;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public ModelTypeRes getModelTypeRes() {
        return modelTypeRes;
    }

    public void setModelTypeRes(ModelTypeRes modelTypeRes) {
        this.modelTypeRes = modelTypeRes;
    }

    public String getContent() {
        return content;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public enum ModelTypeRes {
        LOGO(R.drawable.index_logo_icon),
        JIJIN(R.drawable.index_jijin_icon),

        FOCUSNEW(R.drawable.index_focus_new_icon),

        NOTICE(R.drawable.index_notice_icon),

        ACCOUNT(R.drawable.index_create_account_icon);

        public int modelType;

        public int getModelType() {
            return modelType;
        }

        ModelTypeRes(int modelType) {
            this.modelType = modelType;
        }

        public static ModelTypeRes getModelTypeById(int typeId) {
            switch (typeId) {
                case 1:
                    return ModelTypeRes.JIJIN;
                case 2:
                    return ModelTypeRes.FOCUSNEW;
                case 3:
                    return ModelTypeRes.NOTICE;
                case 4:
                    return ModelTypeRes.ACCOUNT;
                default:
                    return ModelTypeRes.LOGO;
            }
        }
    }
}
